package com.example.springboot159.exception;

import com.example.springboot159.bean.BaseResult;

public class BusinessException extends Exception {
    private BaseResult result;

    public BusinessException(BaseResult result) {
        this.result = result;
    }

    public BusinessException(String message, BaseResult result) {
        super(message);
        this.result = result;
    }

    public BusinessException(String message, Throwable cause, BaseResult result) {
        super(message, cause);
        this.result = result;
    }

    public BusinessException(Throwable cause, BaseResult result) {
        super(cause);
        this.result = result;
    }

    public BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, BaseResult result) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.result = result;
    }

    public BaseResult getResult() {
        return result;
    }

    public void setResult(BaseResult result) {
        this.result = result;
    }
}
